<!DOCTYPE html>
<html>

  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="Cache-Control" content="no-siteapp" />

    <title>TBOOX开源工程</title>
    <meta name="description" content="专注于跨平台c开发解决方案">

    
    <meta name="keywords" content="tbox,xmake,gbox,c,lua,跨平台,构建工具,编译工具,makefile,make,编译器,图形库,linux,编程,开发" /> 

    <!-- qq oauth -->
    <meta property="qc:admins" content="5211601217706727767255" />

    <!--icon -->
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
    <link rel="icon" sizes="192x192" href="/static/img/nice-highres.png" />
	<link rel="apple-touch-icon-precomposed" href="/static/img/apple-touch-icon-57x57-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/img/apple-touch-icon-72x72-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/img/apple-touch-icon-114x114-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/img/apple-touch-icon-144x144-precomposed.png" />
	<link rel="apple-touch-icon-precomposed" sizes="180x180" href="/static/img/retinahd_icon.png" />
	<meta name="msapplication-TileImage" content="/static/img/retinahd_icon.png" />
	
    <link rel="stylesheet" href=" /css/fontawesome/css/font-awesome.min.css ">
    <link rel="stylesheet" href=" /css/main.css ">
    <link rel="canonical" href="https://tboox.org/cn/page10/">
    <link rel="alternate" type="application/rss+xml" title="TBOOX Open Source Project" href="https://tboox.org/feed.xml ">
    <link rel="alternate" hreflang="en" href="https://tboox.org/" />
    <link rel="alternate" hreflang="zh-Hans" href="https://tboox.org/cn/" />

    <!-- css -->
    <link href="/css/reward.css" rel="stylesheet" type="text/css"> 




    <script type="text/javascript">
    function isPC(){    
        var userAgentInfo = navigator.userAgent;  
        var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");    
        var flag = true;    
        for (var v = 0; v < Agents.length; v++) {    
            if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; }    
        }    
        return flag;    
    }
    </script>

<!-- baidu ads -->



    <!-- baidu ads -->

</head>


  <body>

    <header id="top">
    <div class="wrapper">
        <a href="/cn" class="brand">TBOOX</a>
        <button id="headerMenu" class="menu"><i class="fa fa-bars"></i></button>
        <nav id="headerNav">
            <ul>
                <li>
                    
                    <a href="/?lang=0">
                    
                        <i class="fa fa-home"></i>English
                    </a>
                </li>

                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/project/">
                            
                        
                            <i class="fa fa-bookmark"></i>项目
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/archive/">
                            
                        
                            <i class="fa fa-archive"></i>归档
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/category/">
                            
                        
                            <i class="fa fa-th-list"></i>分类
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/tag/">
                            
                        
                            <i class="fa fa-tags"></i>标记
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/docs/">
                            
                        
                            <i class="fa fa-book"></i>文档
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="https://xmake.io/#/zh-cn/about/contact" target="_blank" >
                            
                        
                            <i class="fa fa-forumbee"></i>社区
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/donation/">
                            
                        
                            <i class="fa fa-heart"></i>捐助
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                    
                    <li>
                        
                            
                            <a href="/cn/about/">
                            
                        
                            <i class="fa fa-user"></i>关于
                        </a>
                    </li>
                    
                    
                
                    
                    
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                    
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
                    
                
            </ul>
        </nav>
    </div>
</header>



        <div class="page clearfix" index="">
    <div class="left">
        <h1>TBOOX开源工程</h1>
        <small>专注于跨平台c开发解决方案</small>
        <hr />

        <ul>
            
              <li>
                <h2>
                  <a class="post-link" href="/cn/2019/11/09/quickstart-3-run-and-debug/">xmake从入门到精通3：运行和调试目标程序</a>
                </h2>
                <div class="label">
                    <div class="label-card">
                        <i class="fa fa-calendar"></i>2019-11-09
                    </div>
                    <div class="label-card">
                        
                    </div>
                    <div class="label-card">
                        
                    </div>

                    <div class="label-card">
                    


<!-- <span class="point">•</span> -->
<span class="categories">
  <i class="fa fa-th-list"></i>
  
    
        <a href="/category/#xmake" title="Category: xmake" rel="category">xmake</a>
    
  

  <!-- <span class="point">•</span> -->
</span>


                    </div>

                    <div class="label-card">
                    
<!-- <span class="point">•</span> -->
<span class="pageTag">
  <i class="fa fa-tags"></i>
  
    
        <a href="/cn/tag/#xmake" title="Tag: xmake" rel="tag">xmake</a>&nbsp;
    
        <a href="/cn/tag/#lua" title="Tag: lua" rel="tag">lua</a>&nbsp;
    
        <a href="/cn/tag/#c/c++" title="Tag: c/c++" rel="tag">c/c++</a>&nbsp;
    
        <a href="/cn/tag/#运行" title="Tag: 运行" rel="tag">运行</a>&nbsp;
    
        <a href="/cn/tag/#调试" title="Tag: 调试" rel="tag">调试</a>
    
  

</span>

                    </div>
                </div>
                <div class="excerpt">
                    <p>xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具，主要特点是：语法简单易上手，提供更加可读的项目维护，实现跨平台行为一致的构建体验。</p>

<p>本文主要详细讲解如何加载运行编译好的目标程序，以及如何去调试。</p>

<ul>
  <li><a href="https://github.com/xmake-io/xmake">项目源码</a></li>
  <li><a href="https://xmake.io/#/zh-cn/">官方文档</a></li>
</ul>

<h3 id="运行生成目标">运行生成目标</h3>

<p>xmake也提供了run命令，直接运行生成后的可执行文件，用于方便快速的进行测试，例如：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake run
hello xmake!
</code></pre>
</div>

<h4 id="添加运行环境变量">添加运行环境变量</h4>

<p>我们也可以在xmake.lua中通过<code class="highlighter-rouge">add_runenvs</code>接口来添加设置默认运行target程序的环境变量。</p>

<p>所以，对于PATH这种，通过此接口追加值是非常方便的，而且此接口支持多值设置，所以通常就是用来设置带有path sep的多值env。。</p>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">target</span><span class="p">(</span><span class="s2">"test"</span><span class="p">)</span>
    <span class="n">set_kind</span><span class="p">(</span><span class="s2">"binary"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/*.c"</span><span class="p">)</span>
    <span class="n">add_runenvs</span><span class="p">(</span><span class="s2">"PATH"</span><span class="p">,</span> <span class="s2">"/tmp/bin"</span><span class="p">,</span> <span class="s2">"xxx/bin"</span><span class="p">)</span>
    <span class="n">add_runenvs</span><span class="p">(</span><span class="s2">"LD_LIBRARY_PATH"</span><span class="p">,</span> <span class="s2">"/tmp/lib"</span><span class="p">,</span> <span class="s2">"xxx/lib"</span><span class="p">)</span>
</code></pre>
</div>

<p>更多关于此接口的描述，可以看下文档：<a href="https://xmake.io/#/zh-cn/manual/project_target?id=targetadd_runenvs">add_runenvs接口文档</a></p>


                </div>
                <div class="read-all">
 
                    
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                                
                                <a href="/2019/11/09/quickstart-3-run-and-debug/"><i class="fa fa-language"></i>Read English</a>
                                
                                
                                
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    

                    <a href="/cn/2019/11/09/quickstart-3-run-and-debug/"><i class="fa fa-newspaper-o"></i>阅读全文</a>
                </div>
                <hr />
              </li>
            
              <li>
                <h2>
                  <a class="post-link" href="/cn/2019/11/09/quickstart-2-create-and-build-project/">xmake从入门到精通2：创建和编译工程</a>
                </h2>
                <div class="label">
                    <div class="label-card">
                        <i class="fa fa-calendar"></i>2019-11-09
                    </div>
                    <div class="label-card">
                        
                    </div>
                    <div class="label-card">
                        
                    </div>

                    <div class="label-card">
                    


<!-- <span class="point">•</span> -->
<span class="categories">
  <i class="fa fa-th-list"></i>
  
    
        <a href="/category/#xmake" title="Category: xmake" rel="category">xmake</a>
    
  

  <!-- <span class="point">•</span> -->
</span>


                    </div>

                    <div class="label-card">
                    
<!-- <span class="point">•</span> -->
<span class="pageTag">
  <i class="fa fa-tags"></i>
  
    
        <a href="/cn/tag/#xmake" title="Tag: xmake" rel="tag">xmake</a>&nbsp;
    
        <a href="/cn/tag/#lua" title="Tag: lua" rel="tag">lua</a>&nbsp;
    
        <a href="/cn/tag/#c/c++" title="Tag: c/c++" rel="tag">c/c++</a>&nbsp;
    
        <a href="/cn/tag/#创建工程" title="Tag: 创建工程" rel="tag">创建工程</a>
    
  

</span>

                    </div>
                </div>
                <div class="excerpt">
                    <p>xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具，主要特点是：语法简单易上手，提供更加可读的项目维护，实现跨平台行为一致的构建体验。</p>

<p>本文主要详细讲解如何创建一个基于xmake的工程以及编译操作。</p>

<ul>
  <li><a href="https://github.com/xmake-io/xmake">项目源码</a></li>
  <li><a href="https://xmake.io/#/zh-cn/">官方文档</a></li>
</ul>

<h3 id="创建空工程">创建空工程</h3>

<p>xmake提供了<code class="highlighter-rouge">xmake create</code>命令，可以很方便的快速创建基于c/c++, swift, objc等各种语言的空工程项目，比如：</p>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake create <span class="nb">test
</span>create <span class="nb">test</span> ...
  <span class="o">[</span>+]: xmake.lua
  <span class="o">[</span>+]: src/main.cpp
  <span class="o">[</span>+]: .gitignore
create ok!
</code></pre>
</div>

<p>默认会创建一个c++的hello world工程，根目录下会生成一个xmake.lua用于描述项目的构建规则。</p>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">add_rules</span><span class="p">(</span><span class="s2">"mode.debug"</span><span class="p">,</span> <span class="s2">"mode.release"</span><span class="p">)</span>
<span class="n">target</span><span class="p">(</span><span class="s2">"test"</span><span class="p">)</span>
    <span class="n">set_kind</span><span class="p">(</span><span class="s2">"binary"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/*.cpp"</span><span class="p">)</span> 
</code></pre>
</div>


                </div>
                <div class="read-all">
 
                    
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                                
                                <a href="/2019/11/09/quickstart-2-create-and-build-project/"><i class="fa fa-language"></i>Read English</a>
                                
                                
                                
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    

                    <a href="/cn/2019/11/09/quickstart-2-create-and-build-project/"><i class="fa fa-newspaper-o"></i>阅读全文</a>
                </div>
                <hr />
              </li>
            
              <li>
                <h2>
                  <a class="post-link" href="/cn/2019/11/09/quickstart-1-installation/">xmake从入门到精通1：安装和更新</a>
                </h2>
                <div class="label">
                    <div class="label-card">
                        <i class="fa fa-calendar"></i>2019-11-09
                    </div>
                    <div class="label-card">
                        
                    </div>
                    <div class="label-card">
                        
                    </div>

                    <div class="label-card">
                    


<!-- <span class="point">•</span> -->
<span class="categories">
  <i class="fa fa-th-list"></i>
  
    
        <a href="/category/#xmake" title="Category: xmake" rel="category">xmake</a>
    
  

  <!-- <span class="point">•</span> -->
</span>


                    </div>

                    <div class="label-card">
                    
<!-- <span class="point">•</span> -->
<span class="pageTag">
  <i class="fa fa-tags"></i>
  
    
        <a href="/cn/tag/#xmake" title="Tag: xmake" rel="tag">xmake</a>&nbsp;
    
        <a href="/cn/tag/#lua" title="Tag: lua" rel="tag">lua</a>&nbsp;
    
        <a href="/cn/tag/#安装" title="Tag: 安装" rel="tag">安装</a>&nbsp;
    
        <a href="/cn/tag/#更新" title="Tag: 更新" rel="tag">更新</a>
    
  

</span>

                    </div>
                </div>
                <div class="excerpt">
                    <p>xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具，主要特点是：语法简单易上手，提供更加可读的项目维护，实现跨平台行为一致的构建体验。</p>

<p>本文主要详细讲解xmake在各个平台下的安装过程。</p>

<ul>
  <li><a href="https://github.com/xmake-io/xmake">项目源码</a></li>
  <li><a href="https://xmake.io/#/zh-cn/">官方文档</a></li>
</ul>

<h2 id="安装master版本">安装Master版本</h2>

<p>通常情况下我们只需要通过一键安装脚本即可完成安装。</p>

<h3 id="使用curl">使用curl</h3>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code>bash &lt;<span class="o">(</span>curl -fsSL https://raw.githubusercontent.com/tboox/xmake/master/scripts/get.sh<span class="o">)</span>
</code></pre>
</div>

<h3 id="使用wget">使用wget</h3>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code>bash &lt;<span class="o">(</span>wget https://raw.githubusercontent.com/tboox/xmake/master/scripts/get.sh -O -<span class="o">)</span>
</code></pre>
</div>

<h3 id="使用powershell">使用powershell</h3>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code>Invoke-Expression <span class="o">(</span>Invoke-Webrequest <span class="s1">'https://raw.githubusercontent.com/tboox/xmake/master/scripts/get.ps1'</span> -UseBasicParsing<span class="o">)</span>.Content
</code></pre>
</div>

<p>注：如果ps脚本执行提示失败，可以尝试在管理员模式下执行</p>


                </div>
                <div class="read-all">
 
                    
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                                
                                <a href="/2019/11/09/quickstart-1-installation/"><i class="fa fa-language"></i>Read English</a>
                                
                                
                                
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    

                    <a href="/cn/2019/11/09/quickstart-1-installation/"><i class="fa fa-newspaper-o"></i>阅读全文</a>
                </div>
                <hr />
              </li>
            
              <li>
                <h2>
                  <a class="post-link" href="/cn/2019/10/11/update-v1.6.4/">tbox v1.6.4更新，新增c11风格原子操作</a>
                </h2>
                <div class="label">
                    <div class="label-card">
                        <i class="fa fa-calendar"></i>2019-10-11
                    </div>
                    <div class="label-card">
                        
                    </div>
                    <div class="label-card">
                        
                    </div>

                    <div class="label-card">
                    


<!-- <span class="point">•</span> -->
<span class="categories">
  <i class="fa fa-th-list"></i>
  
    
        <a href="/category/#tbox" title="Category: tbox" rel="category">tbox</a>
    
  

  <!-- <span class="point">•</span> -->
</span>


                    </div>

                    <div class="label-card">
                    
<!-- <span class="point">•</span> -->
<span class="pageTag">
  <i class="fa fa-tags"></i>
  
    
        <a href="/cn/tag/#tbox" title="Tag: tbox" rel="tag">tbox</a>&nbsp;
    
        <a href="/cn/tag/#稳定性修复" title="Tag: 稳定性修复" rel="tag">稳定性修复</a>&nbsp;
    
        <a href="/cn/tag/#版本更新" title="Tag: 版本更新" rel="tag">版本更新</a>&nbsp;
    
        <a href="/cn/tag/#原子" title="Tag: 原子" rel="tag">原子</a>&nbsp;
    
        <a href="/cn/tag/#字符集编码" title="Tag: 字符集编码" rel="tag">字符集编码</a>
    
  

</span>

                    </div>
                </div>
                <div class="excerpt">
                    <p>此版本主要改进stream/stdio读写，字符集编码转换等操作，并重构整个原子操作实现，新增了c11风格atomic api来更细粒度控制。</p>

<ul>
  <li><a href="https://github.com/tboox/tbox">项目源码</a></li>
  <li><a href="https://tboox.io/#/zh-cn/">官方文档</a></li>
</ul>

<h3 id="新特性">新特性</h3>

<ul>
  <li><a href="https://github.com/tboox/tbox/issues/70">#70</a>: 添加<code class="highlighter-rouge">tb_stream_init_from_sock_ref()</code>接口去直接打开一个socket作为stream去读取数据。</li>
  <li>添加stdfile接口去读写stdin, stdout和stderr。</li>
  <li><a href="https://github.com/tboox/tbox/issues/81">#81</a>: 添加对进程和线程的cpu亲缘性设置和获取</li>
  <li>添加filelock文件锁跨平台api接口</li>
  <li>添加匿名管道，命名管道支持</li>
</ul>

<h3 id="改进">改进</h3>

<ul>
  <li>优化queue_buffer模块</li>
  <li>改进stream接口实现</li>
  <li>改进字符集编码转换，以及增加对ANSI编码的支持</li>
  <li>改进原子操作，并增加c11风格原子接口</li>
  <li>改进spinlock实现</li>
  <li>新增进程输出重定向到管道</li>
  <li>针对协程栈使用虚拟内存</li>
  <li>改进基于openssl/mbedtls的https访问</li>
</ul>

<h3 id="源码">源码</h3>

<ul>
  <li><a href="https://github.com/tboox/tbox">Github</a></li>
  <li><a href="https://gitee.com/tboox/tbox">Gitee</a></li>
</ul>


                </div>
                <div class="read-all">
 
                    
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                                
                                <a href="/2019/10/11/update-v1.6.4/"><i class="fa fa-language"></i>Read English</a>
                                
                                
                                
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    

                    <a href="/cn/2019/10/11/update-v1.6.4/"><i class="fa fa-newspaper-o"></i>阅读全文</a>
                </div>
                <hr />
              </li>
            
              <li>
                <h2>
                  <a class="post-link" href="/cn/2019/09/22/xmake-c++20-modules/">使用xmake构建c++20 modules</a>
                </h2>
                <div class="label">
                    <div class="label-card">
                        <i class="fa fa-calendar"></i>2019-09-22
                    </div>
                    <div class="label-card">
                        
                    </div>
                    <div class="label-card">
                        
                    </div>

                    <div class="label-card">
                    


<!-- <span class="point">•</span> -->
<span class="categories">
  <i class="fa fa-th-list"></i>
  
    
        <a href="/category/#xmake" title="Category: xmake" rel="category">xmake</a>
    
  

  <!-- <span class="point">•</span> -->
</span>


                    </div>

                    <div class="label-card">
                    
<!-- <span class="point">•</span> -->
<span class="pageTag">
  <i class="fa fa-tags"></i>
  
    
        <a href="/cn/tag/#xmake" title="Tag: xmake" rel="tag">xmake</a>&nbsp;
    
        <a href="/cn/tag/#lua" title="Tag: lua" rel="tag">lua</a>&nbsp;
    
        <a href="/cn/tag/#c++20" title="Tag: c++20" rel="tag">c++20</a>&nbsp;
    
        <a href="/cn/tag/#modules-ts" title="Tag: modules-ts" rel="tag">modules-ts</a>
    
  

</span>

                    </div>
                </div>
                <div class="excerpt">
                    <p>c++ modules已经正式纳入了c++20草案，msvc和clang也已经基本实现了对<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1103r3.pdf">modules-ts</a>的支持，随着c++20的脚步离我们越来越近，xmake也开始对c++modules提前做好了支持。</p>

<p>目前xmake已经完全支持了msvc/clang的modules-ts构建实现，而对于gcc，由于它的cxx-modules分支还在开发中，还没有正式进入master，我看了下里面的changelog，相关flags还在不断变动，感觉还没稳定下来，因此这里暂时还没对其进行支持。</p>

<p>关于xmake对c++modules的相关进展见：<a href="https://github.com/xmake-io/xmake/pull/569">https://github.com/xmake-io/xmake/pull/569</a></p>

<ul>
  <li><a href="https://github.com/xmake-io/xmake">项目源码</a></li>
  <li><a href="https://xmake.io/#/zh/">官方文档</a></li>
</ul>

<h3 id="hello-module">Hello Module</h3>

<p>关于c++modules的相关介绍我就不多说了，这边主要还是介绍下xmake下如何去构建c++modules项目，我们先来看一个简单的例子：</p>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">target</span><span class="p">(</span><span class="s2">"hello"</span><span class="p">)</span>
    <span class="n">set_kind</span><span class="p">(</span><span class="s2">"binary"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/*.cpp"</span><span class="p">,</span> <span class="s2">"src/*.mpp"</span><span class="p">)</span> 
</code></pre>
</div>

<p>上面是一个支持构建c++modules文件的xmake.lua描述，其中<code class="highlighter-rouge">hello.mpp</code>就是模块文件：</p>

<div class="language-c highlighter-rouge"><pre class="highlight"><code><span class="cp">#include &lt;cstdio&gt;
</span><span class="n">export</span> <span class="n">module</span> <span class="n">hello</span><span class="p">;</span>
<span class="n">using</span> <span class="n">namespace</span> <span class="n">std</span><span class="p">;</span>

<span class="n">export</span> <span class="n">namespace</span> <span class="n">hello</span> <span class="p">{</span>
    <span class="kt">void</span> <span class="n">say</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span><span class="o">*</span> <span class="n">str</span><span class="p">)</span> <span class="p">{</span>
        <span class="n">printf</span><span class="p">(</span><span class="s">"%s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">str</span><span class="p">);</span>
    <span class="p">}</span>
<span class="p">}</span>
</code></pre>
</div>

<p>而main.cpp是使用了hello模块的主程序：</p>

<div class="language-c highlighter-rouge"><pre class="highlight"><code><span class="n">import</span> <span class="n">hello</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
    <span class="n">hello</span><span class="o">::</span><span class="n">say</span><span class="p">(</span><span class="s">"hello module!"</span><span class="p">);</span>
    <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
</code></pre>
</div>

<p>接下来我们执行xmake来构建下这个程序吧：</p>

<div class="language-console highlighter-rouge"><pre class="highlight"><code>ruki:hello ruki$ xmake 
[  0%]: ccache compiling.release src/hello.mpp
[ 50%]: ccache compiling.release src/main.cpp
[100%]: linking.release hello
build ok!
</code></pre>
</div>


                </div>
                <div class="read-all">
 
                    
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                                
                                <a href="/2019/09/22/xmake-c++20-modules/"><i class="fa fa-language"></i>Read English</a>
                                
                                
                                
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    
                        
                        
                            
                        
                    
                        
                    

                    <a href="/cn/2019/09/22/xmake-c++20-modules/"><i class="fa fa-newspaper-o"></i>阅读全文</a>
                </div>
                <hr />
              </li>
            
        </ul>

        <!-- baidu ads -->
        

        <!-- Pagination links -->
        <div class="pagination">
          
            <a href="/cn/index.html" class="previous"><i class="fa fa-angle-double-left"></i></a>
            <a href="/cn/page9" class="previous"><i class="fa fa-angle-left"></i></a>
          
          <span class="page_number ">10/40</span>
          
            <a href="/cn/page11" class="next"><i class="fa fa-angle-right"></i></a>
            <a href="/cn/page40" class="next"><i class="fa fa-angle-double-right"></i></a>
          
        </div>
    </div>
    <!-- <button class="anchor"><i class="fa fa-anchor"></i></button> -->
    <div class="right">
        <div class="wrap">

            <!-- codefund ads -->
            

            <div class="side">
                <div>
                    <i class="fa fa-pencil-square-o" aria-hidden="true"></i>
                    最近文章
                </div>
                <ul class="content-ul" recent="">
                    
                    
                    
                        
                    
                    
                    
                        
                            <li><a href="/cn/2021/12/17/xmake-update-v2.6.2/">xmake v2.6.2 发布，新增 Linux 内核驱动模块构建支持</a></li>
                            
                        
                    
                    
                    
                        
                    
                    
                    
                        
                            <li><a href="/cn/2021/12/03/xmake-update-v2.6.1/">xmake v2.6.1 发布，使用 Lua5.4 运行时，Rust 和 C++ 混合编译支持</a></li>
                            
                        
                    
                    
                    
                        
                    
                    
                    
                        
                            <li><a href="/cn/2021/10/30/xmake-update-v2.5.9/">xmake v2.5.9 发布，改进 C++20 模块，并支持 Nim, Keil MDK 和 Unity Build</a></li>
                            
                        
                    
                    
                    
                        
                    
                    
                    
                        
                            <li><a href="/cn/2021/10/08/xmake-update-v2.5.8/">xmake v2.5.8 发布，新增 Pascal/Swig 程序和 Lua53 运行时支持</a></li>
                            
                        
                    
                    
                    
                        
                    
                    
                    
                        
                            <li><a href="/cn/2021/08/29/xmake-update-v2.5.7/">xmake v2.5.7 发布，包依赖锁定和 Vala/Metal 语言编译支持</a></li>
                            
                        
                    
                    
                    
                        
                    
                    
                    
                        
                            <li><a href="/cn/2021/07/26/xmake-update-v2.5.6/">xmake v2.5.6 发布，改进预编译二进制镜像包兼容性</a></li>
                            
                        
                    
                    
                    
                        
                    
                    
                    
                        
                            <li><a href="/cn/2021/06/30/xmake-update-v2.5.5/">xmake v2.5.5 发布，支持下载集成二进制镜像包</a></li>
                            
                        
                    
                    
                    
                        
                    
                    
                    
                        
                            <li><a href="/cn/2021/05/15/xmake-update-v2.5.4/">xmake v2.5.4 发布，支持 apt/portage 包管理器，改进 xrepo shell 环境</a></li>
                            
                        
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                </ul>
            </div>

            <!-- baidu ads -->
            

            <!-- xmake courses -->
            <br />
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    xmake 入门课程
                </div>
                <a href="https://xmake.io/#/zh-cn/about/course" target="_blank">
                <img src="/static/img/xmake-course.png" alt="course" width="256" height="193" />
                </a>
            </div> 

            <!-- wechat public -->
            <br />
            <div class="side">
                <div>
                    <i class="fa fa-external-link"></i>
                    微信公众号
                </div>
                <img src="/static/img/weixin_public.jpg" alt="wechat" width="256" height="284" />
            </div> 

            <!-- 其他div框放到这里 -->
            <br />
            <div class="side">
                <div>
                    <i class="fa fa-tags"></i>
                    标记
                </div>
                <div class="tags-cloud">
                    
                    
                    
                    

                    

                    
                     
                     
                     
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#文档" style="font-size: 9pt; color: #999;">文档</a>
                    
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#插件" style="font-size: 9.5pt; color: #888;">插件</a>
                    
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#tboox" style="font-size: 9.5pt; color: #999;">tboox</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#站点" style="font-size: 9pt; color: #999;">站点</a>
                    
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#算法" style="font-size: 9pt; color: #999;">算法</a>
                    
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#容器" style="font-size: 9pt; color: #999;">容器</a>
                    
                    
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#内存池" style="font-size: 9pt; color: #999;">内存池</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#跨平台" style="font-size: 9pt; color: #999;">跨平台</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#异常捕获" style="font-size: 9pt; color: #999;">异常捕获</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#windows" style="font-size: 9.5pt; color: #999;">windows</a>
                    
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#编译" style="font-size: 9.5pt; color: #999;">编译</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#配置" style="font-size: 9pt; color: #999;">配置</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#stream" style="font-size: 9pt; color: #999;">stream</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#流" style="font-size: 9pt; color: #999;">流</a>
                    
                    
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#静态库" style="font-size: 9pt; color: #999;">静态库</a>
                    
                    
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#版本更新" style="font-size: 10pt; color: #888;">版本更新</a>
                    
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#类库" style="font-size: 9pt; color: #999;">类库</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#自定义脚本" style="font-size: 9pt; color: #999;">自定义脚本</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#安装" style="font-size: 9pt; color: #999;">安装</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#打包" style="font-size: 9pt; color: #999;">打包</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#android" style="font-size: 9.5pt; color: #999;">android</a>
                    
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#doxygen" style="font-size: 9pt; color: #999;">doxygen</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#宏脚本" style="font-size: 9pt; color: #999;">宏脚本</a>
                    
                    
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#xmake.lua" style="font-size: 9pt; color: #999;">xmake.lua</a>
                    
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#project" style="font-size: 9pt; color: #999;">project</a>
                    
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#交叉编译" style="font-size: 9pt; color: #999;">交叉编译</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#build" style="font-size: 9pt; color: #999;">build</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#调试" style="font-size: 9pt; color: #999;">调试</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#运行" style="font-size: 9pt; color: #999;">运行</a>
                    
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#协程" style="font-size: 9.5pt; color: #999;">协程</a>
                    
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#调试符号" style="font-size: 9pt; color: #999;">调试符号</a>
                    
                    
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#自动检测" style="font-size: 9pt; color: #999;">自动检测</a>
                    
                    
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#工程描述" style="font-size: 9pt; color: #999;">工程描述</a>
                    
                    
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#符号文件" style="font-size: 9pt; color: #999;">符号文件</a>
                    
                    
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#ios" style="font-size: 9pt; color: #999;">ios</a>
                    
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#逆向分析" style="font-size: 9pt; color: #999;">逆向分析</a>
                    
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#手写数字识别" style="font-size: 9pt; color: #999;">手写数字识别</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#神经网络" style="font-size: 9pt; color: #999;">神经网络</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#人工智能" style="font-size: 9pt; color: #999;">人工智能</a>
                    
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#图像处理" style="font-size: 9pt; color: #999;">图像处理</a>
                    
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#定时器" style="font-size: 9pt; color: #999;">定时器</a>
                    
                    
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#时间轮算法" style="font-size: 9pt; color: #999;">时间轮算法</a>
                    
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#context" style="font-size: 9pt; color: #999;">context</a>
                    
                    
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#boost" style="font-size: 9pt; color: #999;">boost</a>
                    
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#服务器" style="font-size: 9pt; color: #999;">服务器</a>
                    
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#版本" style="font-size: 9pt; color: #999;">版本</a>
                    
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#包查找" style="font-size: 9pt; color: #999;">包查找</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#编译器特性检测" style="font-size: 9pt; color: #999;">编译器特性检测</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#预编译头文件" style="font-size: 9pt; color: #999;">预编译头文件</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#扩展模块" style="font-size: 9pt; color: #999;">扩展模块</a>
                    
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#稳定性修复" style="font-size: 9pt; color: #999;">稳定性修复</a>
                    
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#Qt" style="font-size: 9pt; color: #999;">Qt</a>
                    
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#IOCP" style="font-size: 9pt; color: #999;">IOCP</a>
                    
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#远程包管理" style="font-size: 9pt; color: #999;">远程包管理</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#包依赖" style="font-size: 9pt; color: #999;">包依赖</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#自动构建" style="font-size: 9pt; color: #999;">自动构建</a>
                    
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#子工程" style="font-size: 9pt; color: #999;">子工程</a>
                    
                    
                    
                     
                     
                     
                      
                      
                      
                      
                      
                      <a href="/cn/tag/#子模块" style="font-size: 9pt; color: #999;">子模块</a>
                    
                    
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                    
                     
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                     
                     
                     
                    
                    
                </div>
            </div>

            

            <!-- baidu ads -->
            

        </div>
    </div>

    <!-- baidu ads -->
    
</div>



    <footer class="site-footer">
    <div class="wrapper">
        <p class="description">
             Copyright (c) 2016-2020 tboox.org 
        </p>
        <p class="contact">
            
            <a href="https://github.com/waruqi" title="GitHub"><i class="fa fa-github" aria-hidden="true"></i></a> 
             
            
            <a href="mailto:waruqi@gmail.com" title="email"><i class="fa fa-envelope-o" aria-hidden="true"></i></a> 
            
            
            <a href="https://twitter.com/waruqi" title="Twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a> 
            
            <a href="/feed.xml" title="feed"><i class="fa fa-feed" aria-hidden="true"></i></a> 
        </p>
        <p class="power">
            <span>
                Site powered by <a href="https://jekyllrb.com/">Jekyll</a> & <a href="https://github.com/Gaohaoyang">HyG</a> & <a href="https://pages.github.com/">Github Pages</a>.
            </span>
        </p>
    </div>
</footer>

    <div class="back-to-top">
    <a href="#top" class="scroll">
        <i class="fa fa-arrow-up" aria-hidden="true"></i>
    </a>
</div>

    <script src=" /js/main.js " charset="utf-8"></script>
    <script src=" /js/scroll.min.js " charset="utf-8"></script>
  </body>

</html>
